﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace MvcMovie.Models
{
    public class Movie
    {

        public virtual int Id { get; set; }
        [Required(ErrorMessage="Title is necessary")]
        public virtual string Title { get; set; }
        public virtual string Genre { get; set; }
        [Required(ErrorMessage="Price must be grater than 0 and lesser than 1000")]
        [Range(0.01, 1000.0, ErrorMessage="Price must be grater than 0 and lesser than 1000")]
        public virtual decimal Price { get; set; }
        [Required(ErrorMessage="Data must not be blank")]
        public virtual DateTime ReleaseDate { get; set; }
    }
}